package com.fengmi.controller;

import com.fengmi.cms.Content;
import com.fengmi.service.IPortalService;
import com.fengmi.vo.CatCascaderVO;
import com.fengmi.vo.CatHotGoodsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 作者：铁蛋
 * 时间：2021/10/14 20:42
 * 描述：永无Bug
 */
@RestController
@RequestMapping("portal")
public class PortalController {
    @Autowired
    private IPortalService portalService;

    @RequestMapping("findContentListBytpId/{tpId}")
    public List<Content> findContentListBytpId(@PathVariable String tpId){
        return portalService.findContentListBytpId(tpId);
    }
    @RequestMapping("findcatMenu")
    public List<CatCascaderVO> findcatMenu(){
        return portalService.findCatMenu();
    }

    @RequestMapping("findcatHotGoods")
    public List<CatHotGoodsVO> findcatHotGoods(){
        return portalService.findCatAndHotGoods();
    }
}
